home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
fish
/
701-725
/
709
/
planets
/
range.c
< prev
next >
Wrap
Text File
|
1995-03-18
|
676b
|
18 lines
/*******************************************************************************
** We want to stay inside the first turn of the circle, so we want that **
** 0 deg <= val < 360 deg. **
** This is a combination of the old range-routine in planet and the adj360- **
** routine in moonphase. **
*******************************************************************************/
double range(val)
double val;
{
do {
if(val<0.)
val += 360.;
else if(val>=360.)
val -= 360.;
} while(val < 0. || val >= 360.);
return(val);
}